﻿<Window x:Class="Bio.Views.Alignment.Views.GotoColumnRowView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:julmar="http://www.julmar.com/wpfhelpers" xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
        Title="Jump to a Column Index" SizeToContent="WidthAndHeight" WindowStartupLocation="CenterOwner" Background="#FF595959" 
        ShowInTaskbar="False" ResizeMode="NoResize" FocusManager.FocusedElement="{Binding ElementName=tb}">
    <Grid Margin="20">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width=".75*" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <StackPanel Orientation="Horizontal">
            <Label Content="_Goto" Target="{Binding ElementName=tb}" />
            <Label Content="{Binding Type}" Margin="5,0" />
        </StackPanel>
        <TextBox x:Name="tb" Grid.Column="1" MinWidth="75" Text="{Binding Position, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="5,0">
            <Interactivity:Interaction.Behaviors>
                <julmar:NumericTextBoxBehavior AllowMouseDrag="true" />
                <julmar:SelectTextOnFocusBehavior />
            </Interactivity:Interaction.Behaviors>
        </TextBox>
        
        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Right">
            <Button Content="OK" IsDefault="True" Padding="5" Margin="10" MinWidth="75">
                <Interactivity:Interaction.Behaviors>
                    <julmar:CloseDialogBehavior DialogResult="true" />
                </Interactivity:Interaction.Behaviors>
            </Button>
            <Button Content="Cancel" IsCancel="True" Padding="5" Margin="10" MinWidth="75" />
        </StackPanel>
    </Grid>
</Window>
